public class test {
    public static void main(String[] args) {
        RealLinkedList realLinkedList = new RealLinkedList();
        realLinkedList.addFirst(1);//进行头插
        realLinkedList.addFirst(3);//进行头插
        realLinkedList.addLast(2);//进行尾插
        realLinkedList.addIndex(2,999);//任意位置插入
        System.out.println("链表长度"+realLinkedList.size());
        realLinkedList.display();//打印链表
        realLinkedList.remove(3);//删除值为3的节点
        realLinkedList.contains(2);//查找链表中是否有指定元素2
        realLinkedList.display();//打印链表
    }
}
